/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#ifndef __TERRAIN_CONTROL_H__
#define __TERRAIN_CONTROL_H__

#include <QtGui/QWidget>
#include <QtGui/QToolBar>
#include <QtGui/QTreeWidget>

#include "TerrainComponent.h"

#include "TerrainLayerControl.h"
#include "TerrainBrushControl.h"
#include "TerrainTextureDialog.h"

namespace PQBuilder
{
	class TerrainGlobalSettingControl : 
		public QWidget
	{
	public:
		TerrainGlobalSettingControl(QWidget *parent,PQEngine::TerrainGlobalSetting setting);
		~TerrainGlobalSettingControl();
	};

	class TerrainLayerPaintControl : 
		public QWidget
	{
		Q_OBJECT
	public slots:
		void OnAddLayer();
	private:
		TerrainLayerControl* _layerList;
		TerrainBrushControl* _paintControl;
	public:
		TerrainLayerPaintControl(QWidget *parent,PQEngine::TerrainLayerPaintSetting setting);
		~TerrainLayerPaintControl();
	};

	class TerrainHeightPaintControl : 
		public QWidget
	{
	private:
		TerrainBrushControl* _paintControl;
	public:
		TerrainHeightPaintControl(QWidget *parent,PQEngine::TerrainHeightPaintSetting setting);
		~TerrainHeightPaintControl();
	};

	//terrain setting control is better
	class TerrainControl : 
		public QWidget
	{
		Q_OBJECT
	private:
		TerrainHeightPaintControl* _heightPaintControl;
		TerrainLayerPaintControl* _layerPaintControl;
		TerrainGlobalSettingControl* _globalSettingControl;
	public:
		TerrainControl(QWidget *parent,PQEngine::TerrainComponent* component);
		~TerrainControl();
	public slots:
		void OnTabChanaged(int index);
	};
}

#endif
